<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class SeedForumCategoriesData extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        $forum_categories = [
            [
                'pid'=>0,
                'path'=>'0',
                'name'        => '经典问答',
                'icon' => 'img_sm07.jpg',
                'displayorder'=>20
            ],
            [
                'pid'=>0,
                'path'=>'0',
                'name'        => '经典面试题',
                'icon' => 'img_sm08.jpg',
                'displayorder'=>19
            ],
            [
                'pid'=>0,
                'path'=>'0',
                'name'        => '招聘信息',
                'icon' => 'img_sm09.jpg',
                'displayorder'=>18
            ],
            [
                'pid'=>0,
                'path'=>'0',
                'name'        => '学习资料',
                'icon' => 'img_sm10.jpg',
                'displayorder'=>17
            ],
            [
                'pid'=>0,
                'path'=>'0',
                'name'        => '学员作品',
                'icon' => 'img_sm11.jpg',
                'displayorder'=>16
            ],
            [
                'pid'=>0,
                'path'=>'0',
                'name'        => '学生感言',
                'icon' => 'img_sm12.jpg',
                'displayorder'=>15
            ],
            [
                'pid'=>0,
                'path'=>'0',
                'name'        => '职业生涯',
                'icon' => 'img_sm13.jpg',
                'displayorder'=>14
            ],
        ];

        DB::table('forum_categories')->insert($forum_categories);
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
             DB::table('forum_categories')->truncate();
    }
}
